-
Notifications
You must be signed in to change notification settings - Fork 74
feat: add firebase 12 support #199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
To view this pull requests documentation preview, visit the following URL: docs.page/invertase/tanstack-query-firebase~199 Documentation is deployed and generated using docs.page. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @cabljac, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
I've implemented support for Firebase v12 within the Data Connect SDKs, while ensuring backward compatibility with Firebase v11. This involved generating separate SDK packages for each Firebase version and updating the project's dependency management to accommodate both. A new script has also been added to streamline the generation process for these multi-version SDKs.
Highlights
- Firebase v12 Integration: Introduced dedicated Data Connect SDKs for Firebase v12, enabling projects to leverage the latest Firebase features.
- Continued Firebase v11 Support: Created separate Data Connect SDKs for Firebase v11, ensuring existing applications can continue to function without disruption.
- Automated SDK Generation: Added a new shell script (generate-connectors.sh) to automate the process of generating Data Connect SDKs for both Firebase v11 and v12, improving developer workflow.
- Refined Dependency Management: Updated package.json and pnpm-lock.yaml to define and manage Firebase v11 and v12 as distinct peer dependencies using pnpm catalogs, allowing for flexible versioning.
- Package Adaptations: Modified the Angular and React packages to correctly import and utilize the version-specific Data Connect SDKs, adapting their build configurations and dependencies.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces support for Firebase v12 by generating separate SDKs for both v11 and v12, which is a solid approach. The configuration files and dependencies have been updated accordingly, and the new script for generating connectors is a great addition for maintainability. However, I've identified some issues in the generated README files where the import paths are incorrect, which could mislead developers using these SDKs. Please address the suggested changes in the review comments.
f840625
to
3324678
Compare
5d6f57b
to
2eeea30
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds Firebase 12 support alongside the existing Firebase 11 compatibility. The implementation creates separate connector configurations for each Firebase version while maintaining backward compatibility through version-specific SDKs and workspace catalogs.
- Creates version-specific data connectors (v11 and v12) with identical GraphQL schemas
- Adds pnpm workspace catalogs to manage Firebase version dependencies
- Updates package peer dependencies to support both Firebase 11 and 12
Reviewed Changes
Copilot reviewed 26 out of 31 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
pnpm-workspace.yaml | Adds Firebase version catalogs for dependency management |
packages/react/package.json | Updates peer dependencies to support Firebase 11 and 12 |
packages/angular/package.json | Switches to Firebase 11 catalog dependency |
dataconnect/dataconnect.yaml | Configures multiple connector directories for version support |
dataconnect/connector-v11/ | Creates Firebase 11 specific connector configuration |
dataconnect/connector-v12/ | Creates Firebase 12 specific connector configuration |
dataconnect-sdk/js/default-connector-v11/ | Generated SDK for Firebase 11 connector |
dataconnect-sdk/js/default-connector-v12/ | Generated SDK for Firebase 12 connector |
scripts/generate-connectors.sh | Adds script for generating Data Connect SDKs |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
dataconnect-sdk/js/default-connector-v12/package.json:23
- The peer dependencies specify Firebase ^12.0.0 in the PR title and workspace catalogs, but this package.json only includes versions up to ^11.3.0. This should include ^12.0.0 to match the connector-v12 purpose.
"firebase": "^10.14.0 || ^11.3.0"
6d11118
to
7549336
Compare
The Firebase Data Connect SDK generator has a hardcoded behavior where it determines the import
paths in generated files (like READMEs and package.json) based on the connector ID pattern.
Specifically:
default-connector-, it generates import paths as @dataconnect/default-connector-
@dataconnect/default-connector-v11, but the generator ignored our package configuration and
generated imports as @dataconnect/v11 instead
default-connector-v12, the generator correctly produces import paths that match our desired package
names
Why This Matters
while React can support both 11 and 12
separate static connectors ensures type safety at compile time
The Solution
We duplicated the GraphQL schema but configured each connector to:
@dataconnect/default-connector-v12)